package com.yipei.business.service;

import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yipei.business.domain.MlPositionShare;
import com.yipei.business.vo.DeliveryOrderVo;
import com.yipei.business.vo.EntrustOrderVo;
import com.yipei.business.domain.MlTradeEntrustOrder;
import com.yipei.business.vo.TodayDaealVo;
import com.yipei.common.core.domain.AjaxResult;
import com.yipei.common.core.domain.entity.MlTradeAccount;

/**
 * 委托订单Service接口
 *
 * @author yipei
 * @date 2024-12-21
 */
public interface IMlTradeEntrustOrderService extends IService<MlTradeEntrustOrder>
{
    /**
     * 查询委托订单
     *
     * @param id 委托订单主键
     * @return 委托订单
     */
    public MlTradeEntrustOrder selectMlTradeEntrustOrderById(Long id);

    /**
     * 查询委托订单列表
     *
     * @param mlTradeEntrustOrder 委托订单
     * @return 委托订单集合
     */
    public List<MlTradeEntrustOrder> selectMlTradeEntrustOrderList(MlTradeEntrustOrder mlTradeEntrustOrder);

    /**
     * 新增委托订单
     *
     * @param mlTradeEntrustOrder 委托订单
     * @return 结果
     */
    public int insertMlTradeEntrustOrder(MlTradeEntrustOrder mlTradeEntrustOrder);

    /**
     * 修改委托订单
     *
     * @param mlTradeEntrustOrder 委托订单
     * @return 结果
     */
    public int updateMlTradeEntrustOrder(MlTradeEntrustOrder mlTradeEntrustOrder);

    /**
     * 批量删除委托订单
     *
     * @param ids 需要删除的委托订单主键集合
     * @return 结果
     */
    public int deleteMlTradeEntrustOrderByIds(Long[] ids);

    /**
     * 删除委托订单信息
     *
     * @param id 委托订单主键
     * @return 结果
     */
    public int deleteMlTradeEntrustOrderById(Long id);

    AjaxResult addEntrustOrder(EntrustOrderVo entrustOrderVo) throws Exception;

    void entrustOrderCancel(String wtDh) throws Exception;

    List<DeliveryOrderVo> getDeliveryOrderVo(String s_time, String e_time);

    void tradingOrder() throws Exception;

    AjaxResult entrustOrderInsert(MlTradeEntrustOrder mlTradeEntrustOrder) throws Exception;

    void mlTradeAccountSetData(MlTradeAccount mlTradeAccount, BigDecimal cjJg, BigDecimal cjSl, BigDecimal sxf) throws Exception;

    void setSellSymbolData(MlTradeAccount mlTradeAccount, BigDecimal cjJg, String cjSl, BigDecimal sxf);

    void createmlTradeEntrustOrder(MlTradeEntrustOrder mlTradeEntrustOrder);

    void priceCountaddJob() throws Exception;

    void createmlTradeEntrustAddOrsubtract(MlTradeAccount mlTradeAccount, MlTradeEntrustOrder mlTradeEntrustOrder);

    void checkDate(MlTradeEntrustOrder mlTradeEntrustOrder) throws Exception;

    String createrDH(String wt);

    List<TodayDaealVo> getTodayDaea(String symbol, String secName) throws Exception;

    BigDecimal getBigDecimal(MlTradeEntrustOrder mlTradeEntrustOrder, TodayDaealVo todayDaealVo);

    List<TodayDaealVo> buildToday(List<TodayDaealVo> todayDaeas);

    List<TodayDaealVo> createStoday(List<TodayDaealVo> todayDaeas);

    void mlPositionShareSdCw(MlTradeEntrustOrder mlTradeEntrustOrder, List<MlPositionShare> mlPositionShares);

    void mlTradeEntrustOrderCancel();

}
